home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / MOR55SRC.ZIP / MORIA / SOURCE / PLAYER.C < prev    next >
C/C++ Source or Header  |  1992-12-07  |  20KB  |  511 lines

  1. /* source/player.c: player specific variable definitions
  2.  
  3.    Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
  4.  
  5.    This software may be copied and distributed for educational, research, and
  6.    not for profit purposes provided that this copyright and statement are
  7.    included in all such copies. */
  8.  
  9. #include "config.h"
  10. #include "constant.h"
  11. #include "types.h"
  12.  
  13. /* Player record for most player related info */
  14. player_type py;
  15. /* player location in dungeon */
  16. int16 char_row;
  17. int16 char_col;
  18. /* calculated base hp values for player at each level, store them so that
  19.    drain life + restore life does not affect hit points */
  20. int16u player_hp[MAX_PLAYER_LEVEL];
  21.  
  22. /* Class titles for different levels                */
  23. #ifdef MACGAME
  24. char *(*player_title)[MAX_PLAYER_LEVEL];
  25. #else
  26. char *player_title[MAX_CLASS][MAX_PLAYER_LEVEL] = {
  27.     /* Warrior     */
  28. {"Rookie","Private","Soldier","Mercenary","Veteran(1st)","Veteran(2nd)",
  29. "Veteran(3rd)","Warrior(1st)","Warrior(2nd)","Warrior(3rd)","Warrior(4th)",
  30. "Swordsman-1","Swordsman-2","Swordsman-3","Hero","Swashbuckler","Myrmidon",
  31. "Champion-1","Champion-2","Champion-3","Superhero","Knight","Superior Knt",
  32. "Gallant Knt","Knt Errant","Guardian Knt","Baron","Duke","Lord (1st)",
  33. "Lord (2nd)","Lord (3rd)","Lord (4th)","Lord (5th)","Lord (6th)","Lord (7th)",
  34. "Lord (8th)","Lord (9th)","Lord Gallant","Lord Keeper","Lord Noble"},
  35.     /* Mage         */
  36. {"Novice","Apprentice","Trickster-1","Trickster-2","Trickster-3","Cabalist-1",
  37. "Cabalist-2","Cabalist-3","Visionist","Phantasmist","Shadowist","Spellbinder",
  38. "Illusionist","Evoker (1st)","Evoker (2nd)","Evoker (3rd)","Evoker (4th)",
  39. "Conjurer","Theurgist","Thaumaturge","Magician","Enchanter","Warlock",
  40. "Sorcerer","Necromancer","Mage (1st)","Mage (2nd)","Mage (3rd)","Mage (4th)",
  41. "Mage (5th)","Wizard (1st)","Wizard (2nd)","Wizard (3rd)","Wizard (4th)",
  42. "Wizard (5th)","Wizard (6th)","Wizard (7th)","Wizard (8th)","Wizard (9th)",
  43. "Wizard Lord"},
  44.     /* Priests     */
  45. {"Believer","Acolyte(1st)","Acolyte(2nd)","Acolyte(3rd)","Adept (1st)",
  46. "Adept (2nd)","Adept (3rd)","Priest (1st)","Priest (2nd)","Priest (3rd)",
  47. "Priest (4th)","Priest (5th)","Priest (6th)","Priest (7th)","Priest (8th)",
  48. "Priest (9th)","Curate (1st)","Curate (2nd)","Curate (3rd)","Curate (4th)",
  49. "Curate (5th)","Curate (6th)","Curate (7th)","Curate (8th)","Curate (9th)",
  50. "Canon (1st)","Canon (2nd)","Canon (3rd)","Canon (4th)","Canon (5th)",
  51. "Low Lama","Lama-1","Lama-2","Lama-3","High Lama","Great Lama","Patriarch",
  52. "High Priest","Great Priest","Noble Priest"},
  53.     /* Rogues     */
  54. {"Vagabond","Footpad","Cutpurse","Robber","Burglar","Filcher","Sharper",
  55. "Magsman","Common Rogue","Rogue (1st)","Rogue (2nd)","Rogue (3rd)",
  56. "Rogue (4th)","Rogue (5th)","Rogue (6th)","Rogue (7th)","Rogue (8th)",
  57. "Rogue (9th)","Master Rogue","Expert Rogue","Senior Rogue","Chief Rogue",
  58. "Prime Rogue","Low Thief","Thief (1st)","Thief (2nd)","Thief (3rd)",
  59. "Thief (4th)","Thief (5th)","Thief (6th)","Thief (7th)","Thief (8th)",
  60. "Thief (9th)","High Thief","Master Thief","Executioner","Low Assassin",
  61. "Assassin","High Assassin","Guildsmaster"},
  62.     /* Rangers     */
  63. {"Runner (1st)","Runner (2nd)","Runner (3rd)","Strider (1st)","Strider (2nd)",
  64. "Strider (3rd)","Scout (1st)","Scout (2nd)","Scout (3rd)","Scout (4th)",
  65. "Scout (5th)","Courser (1st)","Courser (2nd)","Courser (3rd)","Courser (4th)",
  66. "Courser (5th)","Tracker (1st)","Tracker (2nd)","Tracker (3rd)",
  67. "Tracker (4th)","Tracker (5th)","Tracker (6th)","Tracker (7th)",
  68. "Tracker (8th)","Tracker (9th)","Guide (1st)","Guide (2nd)","Guide (3rd)",
  69. "Guide (4th)","Guide (5th)","Guide (6th)","Guide (7th)","Guide (8th)",
  70. "Guide (9th)","Pathfinder-1","Pathfinder-2","Pathfinder-3","Ranger",
  71. "High Ranger","Ranger Lord"},
  72.     /* Paladins     */
  73. {"Gallant","Keeper (1st)","Keeper (2nd)","Keeper (3rd)","Keeper (4th)",
  74. "Keeper (5th)","Keeper (6th)","Keeper (7th)","Keeper (8th)","Keeper (9th)",
  75. "Protector-1","Protector-2","Protector-3","Protector-4","Protector-5",
  76. "Protector-6","Protector-7","Protector-8","Defender-1","Defender-2",
  77. "Defender-3","Defender-4","Defender-5","Defender-6","Defender-7","Defender-8",
  78. "Warder (1st)","Warder (2nd)","Warder (3rd)","Warder (4th)","Warder (5th)",
  79. "Warder (6th)","Warder (7th)","Warder (8th)","Warder (9th)","Guardian",
  80. "Chevalier","Justiciar","Paladin","High Lord"}
  81. };
  82. #endif
  83.  
  84. /* Base experience levels, may be adjusted up for race and/or class*/
  85. int32u player_exp[MAX_PLAYER_LEVEL] = {
  86.       10,      25,    45,     70,      100,        140,      200,    280,
  87.      380,     500,     650,    850,     1100,       1400,     1800,     2300,
  88.     2900,    3600,    4400,    5400,     6800,       8400,    10200,    12500,
  89.    17500,   25000,  35000L,  50000L,   75000L,    100000L,  150000L,  200000L,
  90.  300000L, 400000L, 500000L, 750000L, 1500000L, 2500000L, 5000000L, 10000000L
  91. };
  92.  
  93. /*Race    STR,INT,WIS,DEX,CON,CHR,
  94.     Ages, heights, and weights (male then female)
  95.     Racial Bases for: dis,srh,stl,fos,bth,bthb,bsav,hitdie,
  96.     infra, exp base, choice-classes */
  97. #ifdef MACGAME
  98. race_type *race;
  99. #else
  100. race_type race[MAX_RACES] = {
  101.    {"Human",     0,  0,     0,  0,     0,  0,
  102.       14,  6, 72,  6,180, 25, 66,  4,150, 20,
  103.       0,  0,  0,  0,  0,  0,  0, 10,  0, 100, 0x3F,
  104.     },
  105.    {"Half-Elf", -1,  1,     0,  1, -1,  1,
  106.       24, 16, 66,  6,130, 15, 62,  6,100, 10,
  107.       2,  6,  1, -1, -1,  5,  3,  9,  2, 110, 0x3F,
  108.     },
  109.    {"Elf",    -1,  2,     1,  1, -2,  1,
  110.       75, 75, 60,  4,100,  6, 54,  4, 80,  6,
  111.       5,  8,  1, -2, -5, 15,  6,  8,  3, 120, 0x1F,
  112.     },
  113.    {"Halfling", -2,  2,     1,  3,     1,  1,
  114.       21, 12, 36,  3, 60,  3, 33,  3, 50,  3,
  115.       15, 12,  4, -5,-10, 20, 18,  6,  4, 110, 0x0B,
  116.     },
  117.    {"Gnome",    -1,  2,     0,  2,     1, -2,
  118.       50, 40, 42,  3, 90,  6, 39,  3, 75,  3,
  119.       10,  6,  3, -3, -8, 12, 12,  7,  4, 125, 0x0F,
  120.     },
  121.    {"Dwarf",     2, -3,     1, -2,     2, -3,
  122.       35, 15, 48,  3,150, 10, 46,  3,120, 10,
  123.       2,  7,  -1,  0, 15,  0,  9,  9,  5, 120, 0x05,
  124.     },
  125.    {"Half-Orc",     2, -1,     0,  0,     1, -4,
  126.       11,  4, 66,  1,150,  5, 62,  1,120,  5,
  127.       -3,  0, -1,  3, 12, -5, -3, 10,  3, 110, 0x0D,
  128.     },
  129.    {"Half-Troll",4, -4, -2, -4,     3, -6,
  130.       20, 10, 96, 10,255, 50, 84,  8,225, 40,
  131.       -5, -1, -2,  5, 20,-10, -8, 12,  3, 120, 0x05,
  132.     }
  133.  };
  134. #endif
  135.  
  136. /* Background information                    */
  137. #ifdef MACGAME
  138. background_type *background;
  139. #else
  140. background_type background[MAX_BACKGROUND] = {
  141. {"You are the illegitimate and unacknowledged child ",         10, 1, 2, 25},
  142. {"You are the illegitimate but acknowledged child ",         20, 1, 2, 35},
  143. {"You are one of several children ",                 95, 1, 2, 45},
  144. {"You are the first child ",                    100, 1, 2, 50},
  145. {"of a Serf.  ",                         40, 2, 3, 65},
  146. {"of a Yeoman.  ",                         65, 2, 3, 80},
  147. {"of a Townsman.  ",                         80, 2, 3, 90},
  148. {"of a Guildsman.  ",                         90, 2, 3,105},
  149. {"of a Landed Knight.  ",                     96, 2, 3,120},
  150. {"of a Titled Noble.  ",                     99, 2, 3,130},
  151. {"of a Royal Blood Line.  ",                    100, 2, 3,140},
  152. {"You are the black sheep of the family.  ",             20, 3,50, 20},
  153. {"You are a credit to the family.  ",                 80, 3,50, 55},
  154. {"You are a well liked child.  ",                100, 3,50, 60},
  155. {"Your mother was a Green-Elf.  ",                 40, 4, 1, 50},
  156. {"Your father was a Green-Elf.  ",                 75, 4, 1, 55},
  157. {"Your mother was a Grey-Elf.  ",                 90, 4, 1, 55},
  158. {"Your father was a Grey-Elf.  ",                 95, 4, 1, 60},
  159. {"Your mother was a High-Elf.  ",                 98, 4, 1, 65},
  160. {"Your father was a High-Elf.  ",                100, 4, 1, 70},
  161. {"You are one of several children ",                 60, 7, 8, 50},
  162. {"You are the only child ",                    100, 7, 8, 55},
  163. {"of a Green-Elf ",                         75, 8, 9, 50},
  164. {"of a Grey-Elf ",                         95, 8, 9, 55},
  165. {"of a High-Elf ",                        100, 8, 9, 60},
  166. {"Ranger.  ",                             40, 9,54, 80},
  167. {"Archer.  ",                             70, 9,54, 90},
  168. {"Warrior.  ",                             87, 9,54,110},
  169. {"Mage.  ",                             95, 9,54,125},
  170. {"Prince.  ",                             99, 9,54,140},
  171. {"King.  ",                            100, 9,54,145},
  172. {"You are one of several children of a Halfling ",         85,10,11, 45},
  173. {"You are the only child of a Halfling ",            100,10,11, 55},
  174. {"Bum.  ",                             20,11, 3, 55},
  175. {"Tavern Owner.  ",                         30,11, 3, 80},
  176. {"Miller.  ",                             40,11, 3, 90},
  177. {"Home Owner.  ",                         50,11, 3,100},
  178. {"Burglar.  ",                             80,11, 3,110},
  179. {"Warrior.  ",                             95,11, 3,115},
  180. {"Mage.  ",                             99,11, 3,125},
  181. {"Clan Elder.  ",                        100,11, 3,140},
  182. {"You are one of several children of a Gnome ",             85,13,14, 45},
  183. {"You are the only child of a Gnome ",                100,13,14, 55},
  184. {"Beggar.  ",                             20,14, 3, 55},
  185. {"Braggart.  ",                             50,14, 3, 70},
  186. {"Prankster.  ",                         75,14, 3, 85},
  187. {"Warrior.  ",                             95,14, 3,100},
  188. {"Mage.  ",                            100,14, 3,125},
  189. {"You are one of two children of a Dwarven ",             25,16,17, 40},
  190. {"You are the only child of a Dwarven ",            100,16,17, 50},
  191. {"Thief.  ",                             10,17,18, 60},
  192. {"Prison Guard.  ",                         25,17,18, 75},
  193. {"Miner.  ",                             75,17,18, 90},
  194. {"Warrior.  ",                             90,17,18,110},
  195. {"Priest.  ",                             99,17,18,130},
  196. {"King.  ",                            100,17,18,150},
  197. {"You are the black sheep of the family.  ",             15,18,57, 10},
  198. {"You are a credit to the family.  ",                 85,18,57, 50},
  199. {"You are a well liked child.  ",                100,18,57, 55},
  200. {"Your mother was an Orc, but it is unacknowledged.  ",         25,19,20, 25},
  201. {"Your father was an Orc, but it is unacknowledged.  ",        100,19,20, 25},
  202. {"You are the adopted child ",                    100,20, 2, 50},
  203. {"Your mother was a Cave-Troll ",                 30,22,23, 20},
  204. {"Your father was a Cave-Troll ",                 60,22,23, 25},
  205. {"Your mother was a Hill-Troll ",                 75,22,23, 30},
  206. {"Your father was a Hill-Troll ",                 90,22,23, 35},
  207. {"Your mother was a Water-Troll ",                 95,22,23, 40},
  208. {"Your father was a Water-Troll ",                100,22,23, 45},
  209. {"Cook.  ",                              5,23,62, 60},
  210. {"Warrior.  ",                             95,23,62, 55},
  211. {"Shaman.  ",                             99,23,62, 65},
  212. {"Clan Chief.  ",                        100,23,62, 80},
  213. {"You have dark brown eyes, ",                     20,50,51, 50},
  214. {"You have brown eyes, ",                     60,50,51, 50},
  215. {"You have hazel eyes, ",                     70,50,51, 50},
  216. {"You have green eyes, ",                     80,50,51, 50},
  217. {"You have blue eyes, ",                     90,50,51, 50},
  218. {"You have blue-gray eyes, ",                    100,50,51, 50},
  219. {"straight ",                             70,51,52, 50},
  220. {"wavy ",                             90,51,52, 50},
  221. {"curly ",                            100,51,52, 50},
  222. {"black hair, ",                         30,52,53, 50},
  223. {"brown hair, ",                         70,52,53, 50},
  224. {"auburn hair, ",                         80,52,53, 50},
  225. {"red hair, ",                             90,52,53, 50},
  226. {"blond hair, ",                        100,52,53, 50},
  227. {"and a very dark complexion.",                     10,53, 0, 50},
  228. {"and a dark complexion.",                     30,53, 0, 50},
  229. {"and an average complexion.",                     80,53, 0, 50},
  230. {"and a fair complexion.",                     90,53, 0, 50},
  231. {"and a very fair complexion.",                    100,53, 0, 50},
  232. {"You have light grey eyes, ",                     85,54,55, 50},
  233. {"You have light blue eyes, ",                     95,54,55, 50},
  234. {"You have light green eyes, ",                    100,54,55, 50},
  235. {"straight ",                             75,55,56, 50},
  236. {"wavy ",                            100,55,56, 50},
  237. {"black hair, and a fair complexion.",                 75,56, 0, 50},
  238. {"brown hair, and a fair complexion.",                 85,56, 0, 50},
  239. {"blond hair, and a fair complexion.",                 95,56, 0, 50},
  240. {"silver hair, and a fair complexion.",                100,56, 0, 50},
  241. {"You have dark brown eyes, ",                     99,57,58, 50},
  242. {"You have glowing red eyes, ",                    100,57,58, 60},
  243. {"straight ",                             90,58,59, 50},
  244. {"wavy ",                            100,58,59, 50},
  245. {"black hair, ",                         75,59,60, 50},
  246. {"brown hair, ",                        100,59,60, 50},
  247. {"a one foot beard, ",                         25,60,61, 50},
  248. {"a two foot beard, ",                         60,60,61, 51},
  249. {"a three foot beard, ",                     90,60,61, 53},
  250. {"a four foot beard, ",                        100,60,61, 55},
  251. {"and a dark complexion.",                    100,61, 0, 50},
  252. {"You have slime green eyes, ",                     60,62,63, 50},
  253. {"You have puke yellow eyes, ",                     85,62,63, 50},
  254. {"You have blue-bloodshot eyes, ",                 99,62,63, 50},
  255. {"You have glowing red eyes, ",                    100,62,63, 55},
  256. {"dirty ",                             33,63,64, 50},
  257. {"mangy ",                             66,63,64, 50},
  258. {"oily ",                            100,63,64, 50},
  259. {"sea-weed green hair, ",                     33,64,65, 50},
  260. {"bright red hair, ",                         66,64,65, 50},
  261. {"dark purple hair, ",                        100,64,65, 50},
  262. {"and green ",                             25,65,66, 50},
  263. {"and blue ",                             50,65,66, 50},
  264. {"and white ",                             75,65,66, 50},
  265. {"and black ",                            100,65,66, 50},
  266. {"ulcerous skin.",                         33,66, 0, 50},
  267. {"scabby skin.",                         66,66, 0, 50},
  268. {"leprous skin.",                        100,66, 0, 50}
  269. };
  270. #endif
  271.  
  272. /* Classes.                            */
  273. class_type class[MAX_CLASS] = {
  274. /*      HP Dis Src Stl Fos bth btb sve S  I  W  D Co Ch  Spell Exp  spl */
  275. {"Warrior",9, 25, 14, 1, 38, 70, 55, 18, 5,-2,-2, 2, 2,-1, NONE,    0, 0},
  276. {"Mage",   0, 30, 16, 2, 20, 34, 20, 36,-5, 3, 0, 1,-2, 1, MAGE,   30, 1},
  277. {"Priest", 2, 25, 16, 2, 32, 48, 35, 30,-3,-3, 3,-1, 0, 2, PRIEST, 20, 1},
  278. {"Rogue",  6, 45, 32, 5, 16, 60, 66, 30, 2, 1,-2, 3, 1,-1, MAGE,    0, 5},
  279. {"Ranger", 4, 30, 24, 3, 24, 56, 72, 30, 2, 2, 0, 1, 1, 1, MAGE,   40, 3},
  280. {"Paladin",6, 20, 12, 1, 38, 68, 40, 24, 3,-3, 1, 0, 2, 2, PRIEST, 35, 1}
  281. };
  282.  
  283. /* making it 16 bits wastes a little space, but saves much signed/unsigned
  284.    headaches in its use */
  285. /* CLA_MISC_HIT is identical to CLA_SAVE, which takes advantage of
  286.    the fact that the save values are independent of the class */
  287. int16 class_level_adj[MAX_CLASS][MAX_LEV_ADJ] = {
  288. /*           bth    bthb   device  disarm   save/misc hit  */
  289. /* Warrior */ {    4,    4,    2,    2,    3 },
  290. /* Mage    */ { 2,    2,    4,    3,    3 },
  291. /* Priest  */ { 2,    2,    4,    3,    3 },
  292. /* Rogue   */ { 3,    4,    3,    4,    3 },
  293. /* Ranger  */ { 3,    4,    3,    3,    3 },
  294. /* Paladin */ { 3,    3,    3,    2,    3 }
  295. };
  296.  
  297. int32u spell_learned = 0;    /* bit mask of spells learned */
  298. int32u spell_worked = 0;    /* bit mask of spells tried and worked */
  299. int32u spell_forgotten = 0;    /* bit mask of spells learned but forgotten */
  300. int8u spell_order[32];        /* order spells learned/remembered/forgotten */
  301.  
  302. /* Warriors don't have spells, so there is no entry for them.  Note that
  303.    this means you must always subtract one from the py.misc.pclass before
  304.    indexing into magic_spell[]. */
  305. #ifdef MACGAME
  306. spell_type (*magic_spell)[31];
  307. #else
  308. spell_type magic_spell[MAX_CLASS-1][31] = {
  309.   {          /* Mage       */
  310.      {    1,  1, 22,   1},
  311.      {    1,  1, 23,   1},
  312.      {    1,  2, 24,   1},
  313.      {    1,  2, 26,   1},
  314.      {    3,  3, 25,   2},
  315.      {    3,  3, 25,   1},
  316.      {    3,  3, 27,   2},
  317.      {    3,  4, 30,   1},
  318.      {    5,  4, 30,   6},
  319.      {    5,  5, 30,   8},
  320.      {    5,  5, 30,   5},
  321.      {    5,  5, 35,   6},
  322.      {    7,  6, 35,   9},
  323.      {    7,  6, 50,  10},
  324.      {    7,  6, 40,  12},
  325.      {    9,  7, 44,  19},
  326.      {    9,  7, 45,  19},
  327.      {    9,  7, 75,  22},
  328.      {    9,  7, 45,  19},
  329.      { 11,  7, 45,  25},
  330.      { 11,  7, 99,  19},
  331.      { 13,  7, 50,  22},
  332.      { 15,  9, 50,  25},
  333.      { 17,  9, 50,  31},
  334.      { 19, 12, 55,  38},
  335.      { 21, 12, 90,  44},
  336.      { 23, 12, 60,  50},
  337.      { 25, 12, 65,  63},
  338.      { 29, 18, 65,  88},
  339.      { 33, 21, 80, 125},
  340.      { 37, 25, 95, 200}
  341.    },
  342.    {          /* Priest       */
  343.      {    1,  1, 10,   1},
  344.      {    1,  2, 15,   1},
  345.      {    1,  2, 20,   1},
  346.      {    1,  2, 25,   1},
  347.      {    3,  2, 25,   1},
  348.      {    3,  3, 27,   2},
  349.      {    3,  3, 27,   2},
  350.      {    3,  3, 28,   3},
  351.      {    5,  4, 29,   4},
  352.      {    5,  4, 30,   5},
  353.      {    5,  4, 32,   5},
  354.      {    5,  5, 34,   5},
  355.      {    7,  5, 36,   6},
  356.      {    7,  5, 38,   7},
  357.      {    7,  6, 38,   9},
  358.      {    7,  7, 38,   9},
  359.      {    9,  6, 38,  10},
  360.      {    9,  7, 38,  10},
  361.      {    9,  7, 40,  10},
  362.      { 11,  8, 42,  10},
  363.      { 11,  8, 42,  12},
  364.      { 11,  9, 55,  15},
  365.      { 13, 10, 45,  15},
  366.      { 13, 11, 45,  16},
  367.      { 15, 12, 50,  20},
  368.      { 15, 14, 50,  22},
  369.      { 17, 14, 55,  32},
  370.      { 21, 16, 60,  38},
  371.      { 25, 20, 70,  75},
  372.      { 33, 24, 90, 125},
  373.      { 39, 32, 99, 200}
  374.    },
  375.    {          /* Rogue       */
  376.      { 99, 99,    0,   0},
  377.      {    5,  1, 50,   1},
  378.      {    7,  2, 55,   1},
  379.      {    9,  3, 60,   2},
  380.      { 11,  4, 65,   2},
  381.      { 13,  5, 70,   3},
  382.      { 99, 99,    0,   0},
  383.      { 15,  6, 75,   3},
  384.      { 99, 99,    0,   0},
  385.      { 17,  7, 80,   4},
  386.      { 19,  8, 85,   5},
  387.      { 21,  9, 90,   6},
  388.      { 99, 99,    0,   0},
  389.      { 23, 10, 95,   7},
  390.      { 99, 99,    0,   0},
  391.      { 99, 99,    0,   0},
  392.      { 25, 12, 95,   9},
  393.      { 27, 15, 99,  11},
  394.      { 99, 99,    0,   0},
  395.      { 99, 99,    0,   0},
  396.      { 29, 18, 99,  19},
  397.      { 99, 99,    0,   0},
  398.      { 99, 99,    0,   0},
  399.      { 99, 99,    0,   0},
  400.      { 99, 99,    0,   0},
  401.      { 99, 99,    0,   0},
  402.      { 99, 99,    0,   0},
  403.      { 99, 99,    0,   0},
  404.      { 99, 99,    0,   0},
  405.      { 99, 99,    0,   0},
  406.      { 99, 99,    0,   0},
  407.    },
  408.    {           /* Ranger        */
  409.      {    3,  1, 30,   1},
  410.      {    3,  2, 35,   2},
  411.      {    3,  2, 35,   2},
  412.      {    5,  3, 35,   2},
  413.      {    5,  3, 40,   2},
  414.      {    5,  4, 45,   3},
  415.      {    7,  5, 40,   6},
  416.      {    7,  6, 40,   5},
  417.      {    9,  7, 40,   7},
  418.      {    9,  8, 45,   8},
  419.      { 11,  8, 40,  10},
  420.      { 11,  9, 45,  10},
  421.      { 13, 10, 45,  12},
  422.      { 13, 11, 55,  13},
  423.      { 15, 12, 50,  15},
  424.      { 15, 13, 50,  15},
  425.      { 17, 17, 55,  15},
  426.      { 17, 17, 90,  17},
  427.      { 21, 17, 55,  17},
  428.      { 21, 19, 60,  18},
  429.      { 23, 25, 95,  20},
  430.      { 23, 20, 60,  20},
  431.      { 25, 20, 60,  20},
  432.      { 25, 21, 65,  20},
  433.      { 27, 21, 65,  22},
  434.      { 29, 23, 95,  23},
  435.      { 31, 25, 70,  25},
  436.      { 33, 25, 75,  38},
  437.      { 35, 25, 80,  50},
  438.      { 37, 30, 95, 100},
  439.      { 99, 99,    0,   0}
  440.    },
  441.    {          /* Paladin       */
  442.      {    1,  1, 30,   1},
  443.      {    2,  2, 35,   2},
  444.      {    3,  3, 35,   3},
  445.      {    5,  3, 35,   5},
  446.      {    5,  4, 35,   5},
  447.      {    7,  5, 40,   6},
  448.      {    7,  5, 40,   6},
  449.      {    9,  7, 40,   7},
  450.      {    9,  7, 40,   8},
  451.      {    9,  8, 40,   8},
  452.      { 11,  9, 40,  10},
  453.      { 11, 10, 45,  10},
  454.      { 11, 10, 45,  10},
  455.      { 13, 10, 45,  12},
  456.      { 13, 11, 45,  13},
  457.      { 15, 13, 45,  15},
  458.      { 15, 15, 50,  15},
  459.      { 17, 15, 50,  17},
  460.      { 17, 15, 50,  18},
  461.      { 19, 15, 50,  19},
  462.      { 19, 15, 50,  19},
  463.      { 21, 17, 50,  20},
  464.      { 23, 17, 50,  20},
  465.      { 25, 20, 50,  20},
  466.      { 27, 21, 50,  22},
  467.      { 29, 22, 50,  24},
  468.      { 31, 24, 60,  25},
  469.      { 33, 28, 60,  31},
  470.      { 35, 32, 70,  38},
  471.      { 37, 36, 90,  50},
  472.      { 39, 38, 95, 100}
  473.    }
  474.  };
  475. #endif
  476.  
  477. char *spell_names[62] = {
  478.   /* Mage Spells */
  479.   "Magic Missile",  "Detect Monsters",    "Phase Door",  "Light Area",
  480.   "Cure Light Wounds",    "Find Hidden Traps/Doors",  "Stinking Cloud",
  481.   "Confusion",    "Lightning Bolt",  "Trap/Door Destruction", "Sleep I",
  482.   "Cure Poison",  "Teleport Self",  "Remove Curse",  "Frost Bolt",
  483.   "Turn Stone to Mud",    "Create Food",    "Recharge Item I",  "Sleep II",
  484.   "Polymorph Other",  "Identify",  "Sleep III",     "Fire Bolt",  "Slow Monster",
  485.   "Frost Ball",     "Recharge Item II", "Teleport Other",    "Haste Self",
  486.   "Fire Ball", "Word of Destruction", "Genocide",
  487.   /* Priest Spells, start at index 31 */
  488.   "Detect Evil",  "Cure Light Wounds",    "Bless",  "Remove Fear", "Call Light",
  489.   "Find Traps",     "Detect Doors/Stairs",     "Slow Poison",     "Blind Creature",
  490.   "Portal",  "Cure Medium Wounds",  "Chant",  "Sanctuary",  "Create Food",
  491.   "Remove Curse",  "Resist Heat and Cold",  "Neutralize Poison",
  492.   "Orb of Draining",  "Cure Serious Wounds",  "Sense Invisible",
  493.   "Protection from Evil",  "Earthquake",  "Sense Surroundings",
  494.   "Cure Critical Wounds",  "Turn Undead",  "Prayer",  "Dispel Undead",
  495.   "Heal",  "Dispel Evil",  "Glyph of Warding",    "Holy Word"
  496. };
  497.  
  498. /* Each type of character starts out with a few provisions.    */
  499. /* Note that the entries refer to elements of the object_list[] array*/
  500. /* 344 = Food Ration, 365 = Wooden Torch, 123 = Cloak, 318 = Beginners-Majik,
  501.    103 = Soft Leather Armor, 30 = Stiletto, 322 = Beginners Handbook */
  502.  
  503. int16u player_init[MAX_CLASS][5] = {
  504.         { 344, 365, 123,  30, 103},    /* Warrior     */
  505.         { 344, 365, 123,  30, 318},    /* Mage         */
  506.         { 344, 365, 123,  30, 322},    /* Priest     */
  507.         { 344, 365, 123,  30, 318},    /* Rogue     */
  508.         { 344, 365, 123,  30, 318},    /* Ranger     */
  509.         { 344, 365, 123,  30, 322}    /* Paladin     */
  510. };
  511.